class Trapezium{

    static double top_width;

    static double bottom_width;

    static double left_waist;

    static double right_waist;

    static double height;

    static String color;

    public void Trapezium(){

    }

    public Trapezium(double top_width, double bottom_width,double left_waist,double right_waist,double height,String color){

        this.top_width=top_width;

        this.bottom_width=bottom_width;

        this.left_waist=left_waist;

        this.right_waist=right_waist;

        this.height=height;

        this.color=color;

    }

    public String setColor(String color){

        this.color=color;
        return color;
    }

    public double getArea(){

        return (top_width+bottom_width)*height*1/2;

    }

    public  double getLength(){

        return top_width+bottom_width+left_waist+right_waist;

    }

}

class lsoscelesTrapezium extends Trapezium{

    double waist;

    public void lsoscelesTrapezium(){

    }

    public lsoscelesTrapezium(double top_width,double bottom_width,double waist,double height,String color){
        super(top_width,bottom_width,waist,waist,height,color);
        this.waist=waist;
    }


    public double getLength(){

        return top_width+bottom_width+waist+waist;

    }

    public void show(){

        double length=top_width+bottom_width+waist+waist;

        System.out.println(length);

    }

}
public class Test {
    public static void main(String[] args) {
        Trapezium trap=new lsoscelesTrapezium(8,20,10,8,"blue");

        double len=trap.getLength();

        System.out.println("等腰梯形的周长为："+len);
    }
}
